/*
 *
 * extensions of standard menu style definitions, see master style sheet for more menu related styles.
 *
 */

ul#menu-bar /*top level menu*/
{
  font: system; font-rendering-mode:classic;
  behavior:menu-bar;
  flow: horizontal;
  color:windowtext; 
  margin:0;  
}

ul#menu-bar > li /* menu item in menu bar */ 
{  
  padding:2px 8px;
  margin:0;
  white-space:nowrap;
  width:max-content;
  display:block;
  flow:horizontal;
}

ul#menu-bar > li:owns-popup {
  background-color:highlight; 
  color:highlighttext;  
}

menu  /* popup menu */
{
  font: system; font-rendering-mode:classic;
  behavior:menu; /*is a menu*/
  flow: vertical;
  display:none; 
  margin:0;  
  padding:1px;
  max-width:max-content;
  /*min-width: max-content;*/
  border:1px solid threedshadow;
  background-color: window;
  color:windowtext;
  margin:0 1px; /* to offset it from parent li */    
}

menu menu /* secondary popup menu */
{
  max-width: max-content;
}

/* menu item in popup menus */
menu li
{  
  width:*;
  flow:horizontal;
  vertical-align:middle;
  padding-left:24px; /* room for icon */
  padding-right:12px; /* room for the arrow */
  padding-top:4px; 
  padding-bottom:4px; 
  foreground-repeat: no-repeat;
  foreground-position: left 2px top 50%;
  color:windowtext;
}

menu li:rtl 
{  
  width:*;
  padding-right:24px; /* room for icon */
  padding-left:12px; /* room for the arrow */
  foreground-repeat: no-repeat;
  foreground-position: right 2px top 50%;
  text-align:right;
  color:windowtext;
}


menu li:disabled { color:graytext; foreground-image: none; }

/* accesskey label (span) */
menu li span.accesskey
{
  display:block;
  width:max-content;
  white-space:nowrap;
  margin-left:*; /* spring to attach it to the right */
  padding-left:1em;
  color:threedshadow;
}

menu li:current span.accesskey
{
  color:#FFD700;
}

/* menu with single <menu> inside - submenu */
menu li:has-child-of-type(menu)
{
  foreground-image:url(stock:arrow-right); /* that arrow */
  foreground-repeat: no-repeat;
  foreground-position: top 50% right 2px;
}

menu li:has-child-of-type(menu):rtl
{
  foreground-image:url(stock:arrow-left); /* that arrow */
  foreground-repeat: no-repeat;
  foreground-position: top 50% left 2px;
}

/* current menu item */
menu li:hover:owns-popup,
menu li:current
{ 
  background-color:highlight; 
  color:highlighttext;  
}

/* menu separator */
menu hr 
{
  margin:2px; 
}

